package com.yan.demo.loopdemo;

import java.util.Scanner;

public class Test7 {
    public static void main(String[] args) {
        System.out.println("输入一个小于10的整数");
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int sum = 1;
        for (int i = 1; i <= n; i++) {
            sum *= i;
        }
        System.out.println("sum = " + sum);
    }
}
